package cn.edu.ctbu.lddweb.service.lmpl;

import cn.edu.ctbu.lddweb.mapper.UserMapper;
import cn.edu.ctbu.lddweb.pojo.Student;
import cn.edu.ctbu.lddweb.service.UserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 实现层
 */
@Service
public class UserServicelmpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<Student> selectList() {
        return userMapper.selectList();
    }

    @Override
    public Student findID(@Param("id") int id) {
        return userMapper.findID(id);
    }

    @Override
    public int insertUser(Student user) {
        return userMapper.insertUser(user);
    }

    @Override
    public int updateUser(Student user) {
        return userMapper.updateUser(user);
    }

    @Override
    public int deleteUser(String id) {
        return userMapper.deleteUser(id);
    }


}
